﻿<UserControl x:Class="CmdletHelpViewer.Views.CmdletCommandExamplesView"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid  Height="Auto" Width="Auto" Background="#FFE3E9F2" >
        <ListBox  ItemsSource="{Binding Path=CmdletCommand.Examples}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Expander Width="Auto" Header="{Binding Path=Title}" VerticalContentAlignment="Top" Background="#FFE3E9F2">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Label Content="Code:" FontWeight="Bold" Grid.Row="0" Background="#FFE3E9F2" />
                            <Label Content="Remarks:" FontWeight="Bold" Grid.Row="2" Background="#FFE3E9F2"/>
                            <TextBox Text="{Binding Path=Code}" AcceptsReturn="True" IsReadOnly="True" Grid.Row="1" Background="#FFE3E9F2" TextWrapping="WrapWithOverflow"/>
                            <TextBox Text="{Binding Path=Remarks}" AcceptsReturn="True" IsReadOnly="True" Grid.Row="3" Background="#FFE3E9F2" TextWrapping="WrapWithOverflow"/>
                        </Grid>
                    </Expander>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <!--<DataGrid ItemsSource="{Binding Path=CmdletCommand.Examples}" AutoGenerateColumns="False" BorderThickness="0" Grid.Row="0" Grid.Column="0" CanUserReorderColumns="False"
                           CanUserSortColumns="False" CanUserResizeRows="False" 
                           HeadersVisibility="Column" GridLinesVisibility="None"
                           HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                         
                           HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                           RowDetailsVisibilityMode="Collapsed" IsReadOnly="True">
            <DataGrid.Columns >
                <DataGridTemplateColumn Width="*">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Expander Width="Auto" Header="{Binding Path=Title}" VerticalContentAlignment="Top" Background="#FFE3E9F2">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Label Content="Code:" FontWeight="Bold" Grid.Row="0" Background="#FFE3E9F2" />
                                    <Label Content="Remark:" FontWeight="Bold" Grid.Row="2" Background="#FFE3E9F2"/>
                                    <TextBlock Text="{Binding Path=Code}" Grid.Row="1" Background="#FFE3E9F2" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=Remarks}" Grid.Row="3" Background="#FFE3E9F2" TextWrapping="Wrap"/>
                                </Grid>
                            </Expander>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>-->
    </Grid>


</UserControl>
